import { blue, gray } from '@ant-design/colors';
import styled from '@emotion/styled';
import { Button } from 'antd';
import { Link } from 'umi';

const styleConfig = {
  position: 'absolute',
  zIndex: 10000000,
  top: '0',
  width: '100%',
  height: '100%',
  pointerEvents: 'none',
  background: "url('/api-wm/image/visible') 0% 0% / 350px repeat",
};

/* 明水印 */
export const WMDiv = () => <div style={styleConfig}></div>;

export const ColorA = styled('a')`
  color: ${blue.primary};
  cursor: pointer;
`;

export const GhostLink = styled(Link)`
  color: black;
  &:hover {
    color: ${blue.primary};
  }
  cursor: pointer;
`;

export const GhostA = styled('a')`
  color: black;
  &:hover {
    color: ${blue.primary};
  }
  cursor: pointer;
`;

export const GhostSecondA = styled('a')`
  color: ${gray[6]};
  &:hover {
    color: ${blue.primary};
  }
  cursor: pointer;
`;

export const ColorLink = styled(Link)`
  color: ${blue.primary};
  cursor: pointer;
`;

export const UnderlineLink = styled(Link)`
  text-decoration: underline;
  color: black;
  &:hover {
    color: ${blue.primary};
  }
  cursor: pointer;
`;

export const UnderlineA = styled('a')`
  text-decoration: underline;
  color: black;
  &:hover {
    color: ${blue.primary};
  }
  cursor: pointer;
`;

export const NoColorLink = styled(Link)`
  color: black;
  &:hover {
    color: black;
  }
  cursor: pointer;
`;

export const GhostALink = styled.a`
  color: black;
  &:hover {
    color: ${blue.primary};
  }
  cursor: pointer;
`;

export const UnderLineA = styled.a`
  text-decoration: underline;
  color: black;
  &:hover {
    color: ${blue.primary};
  }
  cursor: pointer;
`;

export const EllipsisDiv = styled.div`
  display: inline-block;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
`;

export const FloatIconButton = styled(Button)`
  float: right;
  border-style: none !important;
  height: 0;
  cursor: pointer;
`;

export const IconButton = styled(Button)`
  border-style: none;
  height: 0;
  cursor: pointer;
`;

export const PaddingDiv = styled.div`
  padding-top: 8px;
  padding-bottom: 8px;
`;

export const RadiusSpan = styled.div`
  width: 30px;
  height: 30px;
  background: #91d5ff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border-radius: 50%;
  padding: 24px;
`;

export const PreFixSpan = styled.span`
  &::before {
    display: inline-block;
    margin-right: 4px;
    color: #ff4d4f;
    font-size: 12px;
    font-family: SimSun, sans-serif;
    line-height: 1;
    content: '*';
  }
`;

export const OrderNumber = styled.div`
  background-color: #979797;
  color: #fff;
  font-size: 12px;
  line-height: 12px;
  border-radius: 11px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
`;
